package com.haiyou.common.util.random;

import java.io.Serializable;

import com.haiyou.common.util.random.ProbabilityUtils.Probability;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 随机基础对象
 * 
 * @author xingyuan
 * @date 2024年1月10日 上午10:48:19
 */
@Getter
@Setter
@ToString
public class WeightConfig implements Serializable,Probability{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2500254736001467559L;
	/**
	 * id
	 */
	private int id;
	/**
	 * 权重
	 */
	private int weight;
	
	
	public static WeightConfig build(int id,int weight) {
		WeightConfig config = new WeightConfig();
		config.setId(id);
		config.setWeight(weight);
		return config;
	}
}
